Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

〰️ Split Output into Output[] #1661

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

agoose77
Copy link
Contributor

@agoose77 agoose77 commented Nov 20, 2024

Warning

Please do not review this PR. It's a proof-of-concept to illustrate conversation.

This PR is an alternative to #1671 that attempts to solve #1026 by relaxing the 1:1 constraint on Block:Output. This PR:

  1. Converts from outputs with output.data.length === N into N outputs with output.data.length === 1.

New AST Form

type CodeBlock = {
  type: "block";
  kind: "notebook-code",
  children: [
    Code,
    Output,
    ...,
    Output
  ]
}

type Output = {
  type: "output";
  children: GenericNode[];
  visibility: ...;
  data: IOutput[1];
}

As this changes our AST structure, it's a "breaking change". In-person discussions will be held to explore this.

See the edit history for this description to learn how we arrived here.

Closes #1674

Copy link

changeset-bot bot commented Nov 20, 2024

⚠️ No Changeset found

Latest commit: 6bd3baa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@agoose77 agoose77 force-pushed the agoose77/feat-lift-outputs branch from d17c4a4 to 34a014e Compare November 21, 2024 11:40
@agoose77 agoose77 changed the title ⬆️ Lift and parse Markdown/text outputs from Jupyter outputs ⬆️ Lift and parse Markdown/text outputs from Jupyter outputs (option 1) Nov 22, 2024
@agoose77 agoose77 force-pushed the agoose77/feat-lift-outputs branch 2 times, most recently from fb75490 to 7de4192 Compare November 25, 2024 11:45
@agoose77 agoose77 force-pushed the agoose77/feat-lift-outputs branch from 7de4192 to 6bd3baa Compare November 25, 2024 11:52
@agoose77 agoose77 changed the title ⬆️ Lift and parse Markdown/text outputs from Jupyter outputs (option 1) 〰️ Split Output into Output[] Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for representing per-output sub-ASTs in MyST AST
1 participant